package com.tencent.mm.opensdk.modelmsg;

import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;

import com.tencent.mm.opensdk.modelmsg.WXMediaMessage.IMediaObject;

public class WXEmojiSharedObject implements IMediaObject {
    private static final String TAG = "MicroMsg.SDK.WXEmojiSharedObject";
    public int packageflag;
    public String packageid;
    public String thumburl;
    public String url;

    public WXEmojiSharedObject() {

    }

    public WXEmojiSharedObject(String arg1, int arg2, String arg3, String arg4) {

        this.thumburl = arg1;
        this.packageflag = arg2;
        this.packageid = arg3;
        this.url = arg4;
    }

    public boolean checkArgs() {
        boolean v0;
        if((TextUtils.isEmpty(this.packageid)) || (TextUtils.isEmpty(this.thumburl)) || (TextUtils.isEmpty(this.url)) || this.packageflag == -1) {
            Log.e("MicroMsg.SDK.WXEmojiSharedObject", "checkArgs fail, packageid or thumburl is invalid");
            v0 = false;
        }
        else {
            v0 = true;
        }

        return v0;
    }

    public void serialize(Bundle arg3) {
        arg3.putString("_wxemojisharedobject_thumburl", this.thumburl);
        arg3.putInt("_wxemojisharedobject_packageflag", this.packageflag);
        arg3.putString("_wxemojisharedobject_packageid", this.packageid);
        arg3.putString("_wxemojisharedobject_url", this.url);
    }

    public int type() {
        return 15;
    }

    public void unserialize(Bundle arg2) {
        this.thumburl = arg2.getString("_wxwebpageobject_thumburl");
        this.packageflag = arg2.getInt("_wxwebpageobject_packageflag");
        this.packageid = arg2.getString("_wxwebpageobject_packageid");
        this.url = arg2.getString("_wxwebpageobject_url");
    }
}

